import { memo } from 'react';
import KnowItem from './KnowItem';
import { TodoGov } from '@/types/know/know';

interface Props {
  todos: TodoGov[];
}

/**
 * 待处理知识列表
 */
const KnowList = ({ todos }: Props) => {
  return (
    <div className="flex h-full w-full flex-col">
      <div className="ml-4 mt-4 text-[#474C5F]">待治理（15）</div>
      <div className="flex h-full flex-col gap-2 overflow-y-auto overflow-x-hidden p-4">
        {todos.map((item) => (
          <KnowItem todo={item} key={item?._id || item?.datasetId || item?.keyAnswerId} />
        ))}
      </div>
    </div>
  );
};

export default memo(KnowList);
